/*
 Navicat Premium Dump SQL

 Source Server         : 120.27.240.51
 Source Server Type    : MySQL
 Source Server Version : 80200 (8.2.0)
 Source Host           : 120.27.240.51:33306
 Source Schema         : yzczb

 Target Server Type    : MySQL
 Target Server Version : 80200 (8.2.0)
 File Encoding         : 65001

 Date: 03/11/2024 19:19:31
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for room
-- ----------------------------
DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `room_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '宿舍名称',
  `group_id` bigint NOT NULL COMMENT '宿舍楼ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of room
-- ----------------------------
BEGIN;
INSERT INTO `room` (`id`, `room_name`, `group_id`) VALUES (1, '2501', 1);
INSERT INTO `room` (`id`, `room_name`, `group_id`) VALUES (2, '2502', 1);
INSERT INTO `room` (`id`, `room_name`, `group_id`) VALUES (3, '2503', 2);
COMMIT;

-- ----------------------------
-- Table structure for room_group
-- ----------------------------
DROP TABLE IF EXISTS `room_group`;
CREATE TABLE `room_group` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `group_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '宿舍楼名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_group_name` (`group_name`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='宿舍楼表';

-- ----------------------------
-- Records of room_group
-- ----------------------------
BEGIN;
INSERT INTO `room_group` (`id`, `group_name`) VALUES (30, '1232131232');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (31, '123456');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (32, '88888');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (2, '一号楼');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (8, '三号楼');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (1, '二号楼');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (29, '宿舍楼231133');
INSERT INTO `room_group` (`id`, `group_name`) VALUES (28, '宿舍楼一号111111');
COMMIT;

-- ----------------------------
-- Table structure for worker
-- ----------------------------
DROP TABLE IF EXISTS `worker`;
CREATE TABLE `worker` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `realname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '维修员名称',
  `account` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '维修员工号',
  `password` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '维修员密码',
  `gender` tinyint(1) DEFAULT NULL COMMENT '性别(0-男,1-女)',
  `hiredate` datetime DEFAULT NULL COMMENT '入职日期',
  `avatar` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像',
  `phone` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '电话号码',
  `enable` tinyint DEFAULT NULL COMMENT '启用状态(0-未启用,1-启用)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of worker
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
